home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1994 November / macformat-018.iso / Utility Spectacular / Developer / read⁄write ressource ƒ / Read⁄write Read me < prev    next >
Encoding:
Text File  |  1994-01-01  |  2.6 KB  |  65 lines  |  [TEXT/ttxt]

  1. PAUTEX jf
  2. 14, av Milton NANCY 
  3. tel 83.40.36.80  ------------------------------------- Club dev. de NANCY  1993
  4.  
  5. Extension Applescript  ShareWare of $10  :   Read/write resource 1.0
  6.  
  7. This extension of Applescript for read and write some resource in a file into a 
  8. applescript data. All transfert are possibles, reading or writing resources.
  9. This way is more powerfull than ResEdit for automatic transfert of resource
  10.  
  11.  
  12. ------------------ f is a file alias of a file -----------------------------
  13. read resName of file "xxxx" type "TYPE"        -read all name of resource of type "TYPE"
  14. read resID of f type "CODE"                            -read all ID of some resource
  15. read resType of file "fichier"                                          -read all type in a file
  16. read resource of f type "TEXT"    id XX                   -read content of a resource 
  17. read creator of f                                             - read creator of a file
  18. read fileType of f                                            - read file type 
  19.  
  20. Write some resource in a file :
  21. write resource data in f  type "TYPE" id ref  - write data in a resource
  22. write info of f creator "abcd" type "fghi"
  23.  
  24. If the file does not exist create a file for ResEdit by default specificator.
  25. write resource data in file "newfile" type "TYPE" id ref  filetype "file" creator "xxxx"
  26.  
  27. exemple :
  28. set fiche to find document name "SoundEdit™ Pro"
  29. read resource of fiche type "TEXT" id (read resID of fiche type "TEXT")
  30. write resource "Hello word" in file "LCII:fichier"  type "TEXT" id 1
  31.  
  32. To get all resources of Teachtext :
  33.    set x to find document name "TeachText" of type "APPL" in disk "LCII"
  34.    read resType of x
  35.  
  36. Give the list :
  37. {"hdlg", "hmnu", "vers", "SIZE", "ics4", "ics8", "icl4", "icl8", "ics#", "ICN#", "FREF", "BNDL", "ttxt", "PAT#", "WIND", "ALRT", "cicn", "ICON", "DITL", "DLOG", "dctb", "STR#", "MENU", "CODE"}
  38.  
  39. Read version of teachText
  40.    set x to find document name "TeachText" of type "APPL" in disk "LCII"
  41.    read resource of x type "vers" id 1
  42.  
  43. Give :
  44. "ÄF2-7.0(F2-7.0, © Apple Computer, Inc. 1985-1991"
  45.  
  46.  
  47. Copy a teachText file into a resource of type TEXT id = 1 :
  48.    set texte to read data of (find document name "nom texte")
  49.    write resource texte in "disque:fichier"  type "TEXT" id 1
  50. -----------------------------------------------------------------------------
  51. Good luck jf
  52.  
  53. Other OSAX by Pautex jf
  54. - save/read data                  Read or write data of a file
  55. - find document                   Quick search of document by name, type, date...
  56. - play sound                         Play a sound of a file
  57.  
  58. Please support ShareWare of $10 thanks.
  59. Contact PAUTEX jf
  60. 14, av Milton 54000 nancy    
  61. >>>>>>>> e-mail pautex@lpmi.u-nancy.fr <<<<<<<<<
  62.  
  63.  
  64. ...
  65.